#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QTimer>
#include <QPushButton>
#include <QSet>
#include <QStatusBar>
#include <QSoundEffect>
#include<QApplication>
class QLabel;

class MainWindow : public QMainWindow {
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = nullptr);

private:
    int totalColumns = 10;
    int totalRows = 2;
    int gridSize = 60;
    QSoundEffect hitMoleSound;
    QSoundEffect missMoleSound;
    QSoundEffect bombSound;
    int molesShown = 0;
 QSet<int> moleLocations;
    int score = 0;
    QTimer gameTimer;
    QTimer moleTimer;
    QVector<QPushButton *> holes;
    QLabel *scoreLabel;

    void setupGameArea();
    bool spawnMole();
    void spawnBomb();
private slots:
    void hitMole();
    void updateGame();
    void endGame();
};

#endif // MAINWINDOW_H
